﻿/*****************************************************************//**
 * @file    FITKGraphCommons.h
 * @brief   Graph object tool functions class.
 *  
 * @author  ChengHaotian (yeguangbaozi@foxmail.com)
 * @date    2024-04-23
 *********************************************************************/

#ifndef __FITKGRAPHCOMMONS_H__
#define __FITKGRAPHCOMMONS_H__

#include "FITKVTKGraphAdaptorAPI.h"

#include <QColor>

// Forward declaration
class vtkTransform;
class vtkDataObject;
class vtkDataSet;
class vtkCell;
class vtkDataArray;
class vtkTexture;
class vtkUnstructuredGrid;
class vtkMaskPoints;
class vtkAlgorithmOutput;
class vtkRenderer;
class vtkPointSet;

namespace Interface
{
    class FITKAbstractAssInstance;
}

// The id array name in cell or point data.
#ifndef ID_ARRAY
#define ID_ARRAY "ID_ARRAY"
#endif // !ID_ARRAY

// The array name for vtkReader's cell id.
#ifndef ELEMENT_ID_ARRAY
#define ELEMENT_ID_ARRAY "_ELEMENT_ID_"
#endif // !ELEMENT_ID_ARRAY

//// For testing rendering volume.
//#ifndef RENDER_VOLUME_TEST
//#define RENDER_VOLUME_TEST 
//#endif // !RENDER_VOLUME_TEST

namespace Exchange
{
    /**
     * @brief   Graph object tool functions.
     * @author  ChengHaotian (yeguangbaozi@foxmail.com)
     * @date    2024-04-23
     */
    class FITKVTKGRAPHADAPTORAPI FITKGraphCommons
    {
    public:
        /**
         * @brief   Get the color by the given index from default color list.[static]
         * @param   index: The index of color
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        static QColor GetColorByIndex(int index);

        /**
         * @brief   Get the color's rgbf.[static]
         * @param   color: The color
         * @param   rgbf: The RGB float values
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        static void  QColorToDouble3(QColor color, double* rgbf);

        /**
         * @brief   Get the color's rgb.[static]
         * @param   color: The color
         * @param   rgb: The RGB int values.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        static void QColorToInt3(QColor color, int* rgb);

        /**
         * @brief   Compare two double values.( For visualization )[static]
         * @param   a: The first value
         * @param   b: The second value
         * @param   tol: The tolerance[default]
         * @return  Is the two value the same
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2025-01-03
         */
        static bool FuzzyCompare(double a, double b, double tol = 1e-6);

        /**
         * @brief   Get the transformed dataset.[static]
         * @param   transform: The vtkTransform
         * @param   input: The input dataset
         * @param   output: The output dataset
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        static void GetTransformedDataSet(vtkTransform* transform, vtkDataObject* input, vtkDataSet* output);

        /**
         * @brief   Get the instance transform by the given instance data.[static]
         * @param   instance: The instance data
         * @param   transform: The instance's transform
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        static void GetInstanceTransform(Interface::FITKAbstractAssInstance* instance, vtkTransform* transform);

        /**
         * @brief   Remove the cell data's normal data.[static]
         *          ( The mapper will change the back face rendering color if the cell data has the normals,
         *          so if the actor need to be rendered the same for both two face, the normals must be removed. )
         * @param   dataset: The data set
         * @param   deleteArray: Whether to delete the normals array data[default]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-13
         */
        static void RemoveCellNormals(vtkDataSet* dataset, bool deleteArray = false);

        /**
         * @brief   Get the center of the given cell.[static]
         * @param   cell: The cell
         * @param   center: The cell's center
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-14
         */
        static void GetCellCenter(vtkCell* cell, double* center);

        /**
         * @brief   Get the bounds of the given data set.[static]
         * @param   dataObj: The data set
         * @param   bounds: The bounds of the data set
         * @param   mergeBounds: Merge with the given bounds[default]
         * @return  Has bounds
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-29
         */
        static bool GetDataSetBounds(vtkDataObject* dataObj, double* bounds, bool mergeBounds = false);

        /**
         * @brief   Compare two numeric arrays, check if they are fully the same.
         *          (Return false if the array is not numric.)[static]
         *          Supported array types: 
         *          1. vtkIntArray
         *          2. vtkIdTypeArray
         *          3. vtkFloatArray
         *          4. vtkDoubleArray
         *          5. vtkUnsignedCharArray
         * @param   arr1: The data array 1
         * @param   arr2: The data array 2
         * @return  Is the same
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-21
         */
        static bool FuzzyCompareNumericArray(vtkDataArray* arr1, vtkDataArray* arr2);
        
        /**
         * @brief   Given two planes, one infinite and one finite, defined by the normal n
         *          and point o (infinite plane), and the second finite plane1 defined by
         *          the three points (pOrigin,px,py), compute a line of intersection (if
         *          any). The line of intersection is defined by the return values
         *          (x0,x1). If there is no intersection, then zero is returned; otherwise
         *          non-zero. There are two variants of this method. The static function
         *          operates on the supplied function parameters.[static]
         * @param   n: Normal
         * @param   o: Origin
         * @param   pOrigin: Plane origin
         * @param   px: Plane point 1
         * @param   py: Plane point 2
         * @param   x0: Value for intersection
         * @param   x1: Value for intersection
         * @return  Has intersection
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-28
         */
        static int IntersectPlaneWithFinitePlane(double n[3], double o[3], double pOrigin[3], double px[3], double py[3], double x0[3], double x1[3]);

        /**
         * @brief   Given a line defined by the two points p1,p2; and a plane defined by the
         *          normal n and point p0, compute an intersection. The parametric
         *          coordinate along the line is returned in t, and the coordinates of
         *          intersection are returned in x. A zero is returned if the plane and line
         *          do not intersect between (0<=t<=1). If the plane and line are parallel,
         *          zero is returned and t is set to VTK_LARGE_DOUBLE.[static]
         * @param   p1: Point 1
         * @param   p2: Point 2
         * @param   n: Plane normal
         * @param   p0: Plane point
         * @param   t: Tolenrance
         * @param   x: Value for intersection
         * @return  Has intersection
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-28
         */
        static int IntersectPlaneWithLine(const double p1[3], const double p2[3], double n[3], double p0[3], double& t, double x[3]);

        /**
         * @brief   Initialize the texture, in order that the lines can be drawn with stipple line.( For OpenGL2 and higher )[static]
         *          Usage:
         * 
         *          // 1. Create the texture first.
         *          vtkSmartPointer<vtkTexture> texture = vtkSmartPointer<vtkTexture>::New();
         * 
         *          // 2. Call initialize texture function and set the parameters and input data.
         *          FITKGraphCommons::CreateLineStipTexture(dataSet, texture, 0xA1A1, 2);
         * 
         *          // 3. Set the texture to actor.
         *          actor->SetTexture(texture);
         * 
         * @param   dataSet: The input data set
         * @param   texture: The texture
         * @param   lineStipplePattern: 16-bit binary pattern, 1 = pixel on, 0 = pixel off[default]
         * @param   lineStippleRepeat: Stippling repeat factor of a Line, which specifies how many
         *          times each bit in the pattern is to be repeated[default]
         * @return  Is valid
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-06-03
         */
        static bool CreateLineStipTexture(vtkDataObject* dataSet, vtkTexture* texture, int lineStipplePattern = 1, int lineStippleRepeat = 2);

        /**
         * @brief   Add a stipple line with the given grid data, positions and number of segments.[static]
         * @param   ugrid: The unstructured grid data
         * @param   start: The start position of the line
         * @param   end: The end position of the line
         * @param   nSeg: The number of segments[default]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-01
         */
        static void AddStippleLine(vtkUnstructuredGrid* ugrid, double* start, double* end, int nSeg = 80);

        /**
         * @brief   Project a vector to the plane with the origin of the plane and another point.[static]
         * @param   pOrigin: The plane origin
         * @param   pNormal: The plane normal
         * @param   inPoint: The input point
         * @param   outVector: The output vector( Normalized )
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-10
         */
        static void ProjectPointVector(double* pOrigin, double* pNormal, double* inPoint, double* outVector);

        /**
         * @brief   Get the plane normal with origin point, and two lines on the plane.[static]
         * @param   origin: The origin of two directions.
         * @param   direc1: The direction one
         * @param   direc2: The direction two
         * @param   normal: The output normal
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-10
         */
        static void GetPlaneNormal(double* origin, double* direc1, double* direc2, double* normal);

        /**
         * @brief   Initialize the mask points filter by the given number.[static]
         * @param   maskPoints: The mask points filter.[quote]
         * @param   input: The input data object
         * @param   number: The max number
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-10-17
         */
        static void InitializeMaskPoints(vtkMaskPoints* & maskPoints, vtkDataSet* input, int number);

        /**
         * @brief   Initialize the mask points filter by the given number.[static]
         * @param   maskPoints: The mask points filter.[quote]
         * @param   input: The input connection
         * @param   number: The max number
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-10-17
         */
        static void InitializeMaskPoints(vtkMaskPoints* & maskPoints, vtkAlgorithmOutput* input, int number);

        /**
         * @brief   Get the world position of current mouse display position on the given plane.[static]
         * @param   renderer: The renderer
         * @param   mousePos: The mouse position
         * @param   pNor: The plane normal
         * @param   pPos: The plane postion
         * @param   mouseWorldPos: The returned mouse world position on plane
         * @return  Whether the camera direction has cross point with the given plane
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-12-05
         */
        static bool GetMouseWorldPositionOnPlane(vtkRenderer* renderer, int* mousePos, double* pNor, double* pPos, double* mouseWorldPos);

        /**
         * @brief   Snip to the dataset, get the nearest position of the given position.[static]
         * @param   iRen: The input renderer for transfer the position
         * @param   iDataSet: The input dataset
         * @param   iDistForPoint: The input pixel distance for snipping to the points
         *          ( If the value below 0, this function will skip point snipping )
         * @param   iDistForCell: The input pixel distance for snipping to the cells
         * @param   iPos: The input position
         * @param   oPos: The output position
         * @param   oPxDist : The pixel distance from the mouse position to the snipped position on screen[quote]
         * @return  Wether the input position can snip to the grid
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2025-01-02
         */
        static bool SnipToByPixel(vtkRenderer* iRen, vtkPointSet* iDataSet, double iDistForPoint, double iDistForCell, 
            double* iPos, double* oPos, double & oPxDist);

    public:
        // For actors color.
        //@{
        /**
         * @brief   Default color list.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        static QList<QColor> s_colorList;

        /**
         * @brief   Post mesh color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-20
         */
        static QColor s_postMeshColor;   

        /**
         * @brief   Default highlight color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-29
         */
        static QColor s_highlightColor;
        
        /**
         * @brief   Default pre-highlight color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-29
         */
        static QColor s_preHighlightColor;

        /**
         * @brief   Default mesh model color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        static QColor s_defaultMeshColor;

        /**
         * @brief   Default mesh model color with geometry.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-12-13
         */
        static QColor s_defaultGeoMeshColor;

        /**
         * @brief   Assign valid color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        static QColor s_validColor;

        /**
         * @brief   Assign invalid color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        static QColor s_invalidColor;

        /**
         * @brief   Assign not found color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-29
         */
        static QColor s_notFoundColor; 

        /**
         * @brief   Section or material not found color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-17
         */
        static QColor s_noneColor;

        /**
         * @brief   Shell front face color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
        */
        static QColor s_shellFrontColor;

        /**
         * @brief   Shell back face color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        static QColor s_shellBackColor;

        /**
         * @brief   Force load color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        static QColor s_forceLoadColor;

        /**
         * @brief   Moment load color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        static QColor s_momentLoadColor;

        /**
         * @brief   Pressure load color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        static QColor s_pressureLoadColor;     

        /**
         * @brief   Highlight load color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        static QColor s_loadHighlightColor;

        /**
         * @brief   Ref-node color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        static QColor s_refNodeColor;

        /**
         * @brief   Highlight ref-node color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        static QColor s_refNodeHighlightColor;

        /**
         * @brief   The displacement color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        static QColor s_dispBCColor;

        /**
         * @brief   The rotation BC color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        static QColor s_rotateBCColor;

        /**
         * @brief   The velocity BC color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-05
         */
        static QColor s_velBCColor;

        /**
         * @brief   The angle velocity BC color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-05
         */
        static QColor s_angleVelBCColor;

        /**
         * @brief   The constraint color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-26
         */
        static QColor s_constraintColor;

        /**
         * @brief   The constraint control points' color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-26
         */
        static QColor s_constCtrlPointColor;

        /**
         * @brief   The constraint highlight color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-26
         */
        static QColor s_constraintHighlightColor;

        /**
         * @brief   The constraint's location color 1.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        static QColor s_constraintLocColor1;

        /**
         * @brief   The constraint's location color 2.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        static QColor s_constraintLocColor2;

        /**
         * @brief   The interaction highlight color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-06
         */
        static QColor s_interactionHighlightColor;

        /**
         * @brief   The inertia color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-24
         */
        static QColor s_intertiaColor;
        
        /**
         * @brief   The inertia highlight color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-24
         */
        static QColor s_intertiaHighlightColor;

        /**
         * @brief   The coordinate axes color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-27
         */
        static QColor s_coordinateColor;

        /**
         * @brief   The coordinate axes highlight color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-27
         */
        static QColor s_coordinateHighlightColor;

        /**
         * @brief   The wire color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-06-04
         */
        static QColor s_wireColor;

        /**
         * @brief   The wire vertex color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-04
         */
        static QColor s_wireVertexColor;

        /**
         * @brief   The wire highlight color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-06-04
         */
        static QColor s_wireHighlightColor;

        /**
         * @brief   The spring color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-06-20
         */
        static QColor s_springColor;

        /**
         * @brief   The spring highlight color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-06-20
         */
        static QColor s_springHighlightColor;

        /**
         * @brief   The start point color of the connector.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-03
         */
        static QColor s_connStartPtColor;

        /**
         * @brief   The end point color of the connector.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-03
         */
        static QColor s_connEndPtColor;

        /**
         * @brief   The line color of the connector.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-03
         */
        static QColor s_connLineColor;

        /**
         * @brief   The highlight color of the connector's points.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-03
         */
        static QColor s_connHighlightColor;      

        /**
         * @brief   The highlight color of the connector's lines.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-03
         */
        static QColor s_connLineHighlightColor;

        /**
         * @brief   The color of velocity predefined field.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-04
         */
        static QColor s_velFieldColor;

        /**
         * @brief   The highlight color of the velocity predefined field.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-15
         */
        static QColor s_velFieldHighlightColor;

        /**
         * @brief   The color of temperature predefined field.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-04
         */
        static QColor s_tempFieldColor;

        /**
         * @brief   The highlight color of the temperature predefined field.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-15
         */
        static QColor s_tempFieldHighlightColor;

        /**
         * @brief   The color of the beam orientation tangent axes.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-09
         */
        static QColor s_beamOrientColor_t;

        /**
         * @brief   The color of the beam orientation first axes.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-09
         */
        static QColor s_beamOrientColor_1;

        /**
         * @brief   The color of the beam orientation second axes.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-09
         */
        static QColor s_beamOrientColor_2;

        /**
         * @brief   The color of the connector's coordinate system axes.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-29
         */
        static QColor s_connCsysColor;

        /**
         * @brief   Geometry part color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-27
         */
        static QColor s_geometryPartColor;

        /**
         * @brief   Geometry instance color.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-27
         */
        static QColor s_geometryInstanceColor;

        /**
         * @brief   Geometry part color in mesh module for 'invalid'.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-12-16
         */
        static QColor s_geoPartForMeshColorInvalid;

        /**
         * @brief   Geometry part color in mesh module for 'sweep'.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-12-16
         */
        static QColor s_geoPartForMeshColorSweep;

        /**
         * @brief   Geometry part color in mesh module for 'structure'.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-12-16
         */
        static QColor s_geoPartForMeshColorStructure;

        /**
         * @brief   Geometry part color in mesh module for 'free'.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-12-16
         */
        static QColor s_geoPartForMeshColorFree;

        /**
         * @brief   Geometry part color in mesh module for 'bottom to up'.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-12-16
         */
        static QColor s_geoPartForMeshColorBtmToUp;

        /**
         * @brief   The color of the sketch main grid lines.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-12-05
         */
        static QColor s_sketchMainLineColor;

        /**
         * @brief   The color of the sketch sub grid lines.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-12-05
         */
        static QColor s_sketchSubLineColor;

        /**
         * @brief   The color of the sketch axis lines.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-12-11
         */
        static QColor s_sketchAxisColor;

        /**
         * @brief   The color of the sketch previewed wireframe.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-12-06
         */
        static QColor s_sketchPreviewColor;

        /**
         * @brief   The color of the sketch wireframe and constructions.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-12-12
         */
        static QColor s_sketchColor;

        /**
         * @brief   The color of the geometry feature previewing.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2025-01-14
         */
        static QColor s_featurePreviewColor;
        //@}

        // Size.
        //@{
        /**
         * @brief   The point size for highlighting.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-17
         */
        static double s_highlightPointSize;

        /**
         * @brief   The line width for highlighting.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-17
         */
        static double s_highlightLineWidth;
        //@}

        // Properties.
        //@{
        /**
         * @brief   The default transparency.[static]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-15
         */
        static double s_transparency;

        /**
         * @brief   The pixel size for sketch snipping.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-12-16
         */
        static int s_pixelSnipGridPoint;

        /**
         * @brief   The pixel size for sketch snipping.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-12-16
         */
        static int s_pixelSnipSketchPoint;

        /**
         * @brief   The pixel size for sketch snipping.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-12-16
         */
        static int s_pixelSnipSketchLine;
        //@}

        // Polygon offsets.
        //@{
        /**
         * @brief   The polygon offset of the geometry.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2025-01-18
         */
        static double s_geomPolyOffset;

        /**
         * @brief   The polygon offset of the mesh.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2025-01-18
         */
        static double s_meshPolyOffset;
        //@}

    };
}   // namespace Exchange

#endif // __FITKGRAPHCOMMONS_H__
